package com.zhongjinkang.rhythm.Model

import com.huang.mylibrary.db.DBHelper
import com.zhongjinkang.rhythm.uiBean.PortrayBean

class HomeModel : BaseModel() {


    fun getList(): List<PortrayBean> {
        val data = DBHelper.getInstance().userInfoHelper.userInfo
        val returnData = mutableListOf<PortrayBean>()
        for (index in 0 until data.size) {
            returnData.add(
                createPortrayBean(
                    data[index].url,
                    data[index].name,
                    data[index].peopleId
                )
            )
        }
        return returnData;
//
//        return mutableListOf<PortrayBean>(
//
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003228/2018-11-02_16-32-27_638317.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003234/2018-11-02_16-32-33_411998.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003150/2018-11-02_16-31-49_124862.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003155/2018-11-02_16-31-54_556535.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003201/2018-11-02_16-32-00_817697.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003206/2018-11-02_16-32-05_220371.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003215/2018-11-02_16-32-14_062080.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003210/2018-11-02_16-32-09_622230.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003219/2018-11-02_16-32-18_305383.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003223/2018-11-02_16-32-22_741377.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003253/2018-11-02_16-32-52_745338.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/p/2018/11/03003249/2018-11-02_16-32-48_533193.webp")
//
//        )
    }

//    fun  getList2():List<PortrayBean>{
//        return mutableListOf<PortrayBean>(
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_140.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_139.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_142.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_127.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_128.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_130.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_129.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_167.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_168.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_169.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_170.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_171.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_172.webp"),
//            createPortrayBean("https://8xhnx.xyz:8443/wp-content/uploads/Table_173.webp"),
//        )
//
//    }

    fun createPortrayBean(url: String, name: String, peopleId: Long): PortrayBean {
        val portrayBean = PortrayBean()
        portrayBean.url = url
        portrayBean.describe = name;
        portrayBean.peopleId = peopleId
        return portrayBean

    }
}